package com.example.user.service;


import com.example.user.entity.CommunityActivity;
import com.example.user.mapper.HomeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HomeService {


    @Autowired
    private HomeMapper homeMapper;

    public List<CommunityActivity> selectActivtyPage() {

      List<CommunityActivity> communityActivityList=  homeMapper.selectActivtyPage();
      return communityActivityList;
    }

    public List<CommunityActivity> selectActivityByName(String activityName) {

      List<CommunityActivity> communityActivityList=  homeMapper.selectActivityByName(activityName);
      return communityActivityList;
    }

    public List<CommunityActivity> selectActivtyByType(String activityType) {
       List<CommunityActivity> communityActivityList= homeMapper.selectActivtyByType(activityType);
       return communityActivityList;
    }

    public List<CommunityActivity> selectActivityByLocation(String activityLocation) {
       List<CommunityActivity> communityActivityList= homeMapper.selectActivityByLocation(activityLocation);
       return communityActivityList;
    }
}
